#include "bind.hpp"

int main()
{
    using Functor = std::function<void(int)>;
    std::vector<Functor> task_pool;

    task_pool.push_back(std::bind(print,"hello",std::placeholders::_1));
    task_pool.push_back(std::bind(print,"sola",std::placeholders::_1));
    task_pool.push_back(std::bind(print,"ss",std::placeholders::_1));
    task_pool.push_back(std::bind(print,"ssss",std::placeholders::_1));

    for(auto& e: task_pool)
    {
        e(1);
    }
    // using Functor = std::function<void(int)>;
    // std::vector<Functor> task_pool;
    // task_pool.push_back(std::bind(print, "⽐特",std::placeholders::_1));
    // task_pool.push_back(std::bind(print, "你好",std::placeholders::_1));
    // task_pool.push_back(std::bind(print, "我是",std::placeholders::_1));
    // task_pool.push_back(std::bind(print, "好学⽣",std::placeholders::_1));
    // for (auto &functor : task_pool) {
    //     functor(1);
    // }

    return 0;
}

// #include <iostream>
// #include <string>
// #include <vector>
// #include <functional>
// void print(const std::string &str,int num) {
//  std::cout << str << num<<std::endl;
// }
// int main()
// {
//  using Functor = std::function<void(int)>;
//  std::vector<Functor> task_pool;
//  task_pool.push_back(std::bind(print, "⽐特",std::placeholders::_1));
//  task_pool.push_back(std::bind(print, "你好",std::placeholders::_1));
//  task_pool.push_back(std::bind(print, "我是",std::placeholders::_1));
//  task_pool.push_back(std::bind(print, "好学⽣",std::placeholders::_1));
//  for (auto &functor : task_pool) {
//  functor(1);
//  }
//  return 0;
// }